package gov.dhs.cis.soa.data;

import gov.dhs.cis.soa.Constants.EntityType;

import java.sql.Timestamp;


public class Attributes extends AbstractSOAData {
	public static final String STEREO_TYPE = "Attribute";

	public int id;
	public String name;
	public String dataType;
	public String dataOut;

	public transient Timestamp createdDt = new Timestamp(System.currentTimeMillis());

	@Override
	public String toString() {
		return "Attribute [id=" + id + ", name=" + name + "]";
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Attributes other = (Attributes) obj;
		if (name.equalsIgnoreCase(other.name))
			return true;
		return false;
	}
	
//	public static String getUMLId(int entityId) {
//		return EntityType.SOPER + "_" + entityId;
//	}
	
	@Override
	public long getId() {
		return id;
	}
	@Override
	public String getHashableId() {
		return name;
	}
	
	@Override
	public EntityType getUMLType() {
		return EntityType.ATTR;
	}
}
